When we write the program, some of the parameters are often changed, and this change is not what we foresee. For example, we developed a module to operate the database, in the development of our connection to the local database so IP, database name,
When writing a project, we often modify some configuration variables to adapt to different operating environment, but also allows users to leave the program to modify the relevant variable settings. Usually we define these variables in a file with
Several Methods for java to read the. properties configuration file: java. properties
Reading the. properties configuration file is much used in actual development. To sum up, there are several methods (I only know ):
1. java. util. Properties class
The file system on Linux is generally EXT2 or EXT3, but this article is not ready to talk about them directly, but I want to combine the Linux operating system and from the foundation of the file system-the hard disk to start, step-by-step
Normally, you can only change the read-only property of a file by right-clicking the property, and the system properties don't even have the appropriate options (figure):
Operation Steps:
1, right click on the folder, click the
Systemproperties class in the Android.os, but this class is hidden, the upper program development can not be used directly, with the Java reflection mechanism can be.Java code to create and modify Android properties with Systemproperties.set (name,
Use Properties to read the configuration file and obtain the specific content value. properties configuration file
Sometimes, when writing a configuration file, you need to know whether the read content is correct. We need to test it to see if the
All along, not often to use or focus too much on Windows XP, the properties of those files, are the properties of this property is only to know the size of the file capacity, sharing settings and other common operations. In fact, there are a lot of
File System Properties View and adjustment tools:e2label Command : Set the file system volume label to avoid formatting changes to the volume labelE2label device name [Label]#查看分区卷标 [[email protected] ~]# e2label/dev/sdb1mytest# Modify the partition
Windows can support both FAT32 and NTFS two file systems, FAT32 is longer than compatibility, and NTFS is longer than system security. Under the premise of satisfying the application, how to set up the file system to give full play to the features
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.